Passed
Push — master ( b15b71...ab24e8 )
by Paul
04:46
created

GLSR.getSelectorOfElement   B

Complexity

Conditions 5
Paths 5

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 5
c 1
b 0
f 0
nc 5
nop 1
dl 0
loc 7
rs 8.8571
1
/** global: GLSR */
2
document.addEventListener( 'DOMContentLoaded', function() {
3
	// set text direction class
4
	var widgets = document.querySelectorAll( '.glsr-widget, .glsr-shortcode' );
5
	for( var i = 0; i < widgets.length; i++ ) {
6
		var direction = window.getComputedStyle( widgets[i], null ).getPropertyValue( 'direction' );
7
		widgets[i].classList.add( 'glsr-' + direction );
8
	}
9
	new GLSR.Forms();
10
	new GLSR.Pagination();
11
	new GLSR.Excerpts();
12
});
13